package com.iwhalecloud.bss.kite.cucc.service.route.match.impl;

import org.apache.commons.lang.StringUtils;

import com.iwhalecloud.bss.kite.cucc.service.route.InfServReqParam;
import com.iwhalecloud.bss.kite.cucc.service.route.strategy.impl.InfBcmcServiceBusStrategy;

/**
 * <Description> <br>
 * 通用匹配
 * 
 * @author XXX<br>
 * @version 1.0<br>
 * @taskId <br>
 * @CreateDate 2020年12月4日 <br>
 * @since R9.0<br>
 * @see com.iwhalecloud.bss.kite.cucc.service.route.impl <br>
 */
public class CommonMatchHandler extends AbstractInfServRouteHandler {

    @Override
    public void doHandle(InfServReqParam request) {

        String orderSource = request.getOrderSource();
        // 订单来源是BCMC
        if (StringUtils.equals(orderSource, "BCMC")) {
            request.setInfServStrategy(new InfBcmcServiceBusStrategy());
            // 满足调条件，终止调度，返回服务策略
            request.setAbort(Boolean.TRUE);
        }
    }
}
